<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="${ctx.contextPath}">
      <img src="${ctx.contextPath}/static/images/logo.png" alt="layui">
    </a>
    <ul class="layui-nav fly-nav layui-hide-xs">
      <li class="layui-nav-item layui-this">
        <a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>
      </li>
      <li class="layui-nav-item">
        <a href="case/case.html"><i class="iconfont icon-iconmingxinganli"></i>案例</a>
      </li>
      <li class="layui-nav-item">
        <a href="http://www.layui.com/" target="_blank"><i class="iconfont icon-ui"></i>框架</a>
      </li>
    </ul>
    
    <ul class="layui-nav fly-nav-user">
      <@shiro.guest>
        <!-- 未登入的状态 -->
        <li class="layui-nav-item">
          <a class="iconfont icon-touxiang layui-hide-xs" href="${ctx.contextPath}/user/login"></a>
        </li>
        <li class="layui-nav-item">
          <a href="${ctx.contextPath}/user/login">登入</a>
        </li>
        <li class="layui-nav-item">
          <a href="${ctx.contextPath}/user/reg">注册</a>
        </li>
      </@shiro.guest>

      <@shiro.user>
        <!-- 登入后的状态 -->
        <li class="layui-nav-item">
          <a class="fly-nav-avatar" href="${ctx.contextPath}/user/center">
            <cite class="layui-hide-xs">${user.username!''}</cite>
            <i class="iconfont icon-renzheng" title="认证信息：${user.roleName!''}"></i>
            <img id="header_avatar" src="${ctx.contextPath}${user.avatar!''}">
          </a>
          <dl class="layui-nav-child">
            <dd><a href="${ctx.contextPath}/user/home"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
            <dd><a href="${ctx.contextPath}/user/center"><i class="layui-icon" style="color: #8b8b8b">&#xe612;</i>用户中心</a></dd>
            <dd><a href="${ctx.contextPath}/user/set/info"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
            <dd><a href="${ctx.contextPath}/user/message"><i class="layui-icon" style="color: #8b8b8b">&#xe611;</i>我的消息</a></dd>
            <hr style="margin: 5px 0;">
            <dd><a href="${ctx.contextPath}/user/logout" style="text-align: center;">退出</a></dd>
          </dl>
        </li>
      </@shiro.user>
      
    </ul>
  </div>
</div>